#!/usr/bin/python

KK = '2 89 78 23 13'
ss = KK.split()
ss.reverse()
print(*ss)
a = [ int(x) for x in ss ]
a.sort()
print(*a)
a.reverse()
print(*a)
print(min(a))
print(max(a))
